{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:48.878300Z",
     "start_time": "2021-03-28T13:55:48.136719Z"
    }
   },
   "outputs": [],
   "source": [
    "import requests\n",
    "import pandas as pd\n",
    "\n",
    "from pyecharts.charts import Bar,Map,Line,Page,Scatter, WordCloud\n",
    "from pyecharts import options as opts\n",
    "from pyecharts.globals import SymbolType,ThemeType\n",
    "from pyecharts.charts import Grid\n",
    "# from wordcloud import WordCloud,STOPWORDS\n",
    "# from imageio import imread\n",
    "import matplotlib.pyplot as plt\n",
    "plt.rcParams['font.sans-serif'] = ['Arial Unicode MS']\n",
    "plt.rcParams['axes.unicode_minus'] = False  # 用来正常显示负号"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:48.883062Z",
     "start_time": "2021-03-28T13:55:48.880362Z"
    }
   },
   "outputs": [],
   "source": [
    "def get_date_list(begin_date,end_date):\n",
    "    date_list = [x.strftime('%Y-%m-%d') for x in list(pd.date_range(start=begin_date, end=end_date))]\n",
    "    return date_list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:48.888834Z",
     "start_time": "2021-03-28T13:55:48.885399Z"
    }
   },
   "outputs": [],
   "source": [
    "def save_to_csv(data, date):\n",
    "    with open('ios.csv', 'a+') as f:\n",
    "        f.write('name|rating|price|rating_count|publisher_country|rank|date\\n')\n",
    "        for i in data:\n",
    "            f.write('{}|{}|{}|{}|{}|{}|{}\\n'.format(i[0]['name'], i[0]['rating'], i[0]['price'], i[0]['rating_count'], i[0]['publisher_country'], i[0]['rank'], date))\n",
    "        "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:48.929790Z",
     "start_time": "2021-03-28T13:55:48.891033Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>rating</th>\n",
       "      <th>price</th>\n",
       "      <th>rating_count</th>\n",
       "      <th>publisher_country</th>\n",
       "      <th>rank</th>\n",
       "      <th>date</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>拼多多 - 多多买菜，百亿补贴</td>\n",
       "      <td>3.47232</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1615277</td>\n",
       "      <td>China</td>\n",
       "      <td>1</td>\n",
       "      <td>2020-12-09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>微信</td>\n",
       "      <td>4.36461</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5694634</td>\n",
       "      <td>China</td>\n",
       "      <td>2</td>\n",
       "      <td>2020-12-09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>抖音</td>\n",
       "      <td>4.9135</td>\n",
       "      <td>0.0</td>\n",
       "      <td>29903739</td>\n",
       "      <td>China</td>\n",
       "      <td>3</td>\n",
       "      <td>2020-12-09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>支付宝 - 生活好 支付宝</td>\n",
       "      <td>4.26844</td>\n",
       "      <td>0.0</td>\n",
       "      <td>835978</td>\n",
       "      <td>China</td>\n",
       "      <td>4</td>\n",
       "      <td>2020-12-09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>手机淘宝 - 淘到你说好</td>\n",
       "      <td>4.33646</td>\n",
       "      <td>0.0</td>\n",
       "      <td>945088</td>\n",
       "      <td>China</td>\n",
       "      <td>5</td>\n",
       "      <td>2020-12-09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9084</th>\n",
       "      <td>美颜相机 - 拍人像更专业</td>\n",
       "      <td>4.8438</td>\n",
       "      <td>0.0</td>\n",
       "      <td>475231</td>\n",
       "      <td>Hong Kong</td>\n",
       "      <td>96</td>\n",
       "      <td>2021-03-07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9085</th>\n",
       "      <td>韩剧TV-追剧大本营</td>\n",
       "      <td>4.90492</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4751985</td>\n",
       "      <td>China</td>\n",
       "      <td>97</td>\n",
       "      <td>2021-03-07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9086</th>\n",
       "      <td>Instagram</td>\n",
       "      <td>4.76565</td>\n",
       "      <td>0.0</td>\n",
       "      <td>675285</td>\n",
       "      <td>US</td>\n",
       "      <td>98</td>\n",
       "      <td>2021-03-07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9087</th>\n",
       "      <td>哈啰出行-顺风车及共享单车助力车平台</td>\n",
       "      <td>4.74519</td>\n",
       "      <td>0.0</td>\n",
       "      <td>648485</td>\n",
       "      <td>China</td>\n",
       "      <td>99</td>\n",
       "      <td>2021-03-07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9088</th>\n",
       "      <td>货拉拉-搬家拉货的货运物流平台</td>\n",
       "      <td>4.63271</td>\n",
       "      <td>0.0</td>\n",
       "      <td>130111</td>\n",
       "      <td>Hong Kong</td>\n",
       "      <td>100</td>\n",
       "      <td>2021-03-07</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8915 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                    name   rating price rating_count publisher_country rank  \\\n",
       "0        拼多多 - 多多买菜，百亿补贴  3.47232   0.0      1615277             China    1   \n",
       "1                     微信  4.36461   0.0      5694634             China    2   \n",
       "2                     抖音   4.9135   0.0     29903739             China    3   \n",
       "3          支付宝 - 生活好 支付宝  4.26844   0.0       835978             China    4   \n",
       "4           手机淘宝 - 淘到你说好  4.33646   0.0       945088             China    5   \n",
       "...                  ...      ...   ...          ...               ...  ...   \n",
       "9084       美颜相机 - 拍人像更专业   4.8438   0.0       475231         Hong Kong   96   \n",
       "9085          韩剧TV-追剧大本营  4.90492   0.0      4751985             China   97   \n",
       "9086           Instagram  4.76565   0.0       675285                US   98   \n",
       "9087  哈啰出行-顺风车及共享单车助力车平台  4.74519   0.0       648485             China   99   \n",
       "9088     货拉拉-搬家拉货的货运物流平台  4.63271   0.0       130111         Hong Kong  100   \n",
       "\n",
       "            date  \n",
       "0     2020-12-09  \n",
       "1     2020-12-09  \n",
       "2     2020-12-09  \n",
       "3     2020-12-09  \n",
       "4     2020-12-09  \n",
       "...          ...  \n",
       "9084  2021-03-07  \n",
       "9085  2021-03-07  \n",
       "9086  2021-03-07  \n",
       "9087  2021-03-07  \n",
       "9088  2021-03-07  \n",
       "\n",
       "[8915 rows x 7 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv('data/app_analyse/ios.csv', sep='|')\n",
    "df.drop_duplicates(inplace=True)\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:48.946255Z",
     "start_time": "2021-03-28T13:55:48.931797Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>rating</th>\n",
       "      <th>price</th>\n",
       "      <th>rating_count</th>\n",
       "      <th>publisher_country</th>\n",
       "      <th>rank</th>\n",
       "      <th>date</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>拼多多 - 多多买菜，百亿补贴</td>\n",
       "      <td>3.47232</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1615277</td>\n",
       "      <td>China</td>\n",
       "      <td>1</td>\n",
       "      <td>2020-12-09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>202</th>\n",
       "      <td>农行掌上银行</td>\n",
       "      <td>3.02161</td>\n",
       "      <td>0.0</td>\n",
       "      <td>71163</td>\n",
       "      <td>China</td>\n",
       "      <td>1</td>\n",
       "      <td>2020-12-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>303</th>\n",
       "      <td>拼多多 - 多多买菜，百亿补贴</td>\n",
       "      <td>3.47232</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1615277</td>\n",
       "      <td>China</td>\n",
       "      <td>1</td>\n",
       "      <td>2020-12-11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>404</th>\n",
       "      <td>拼多多 - 多多买菜，百亿补贴</td>\n",
       "      <td>3.47232</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1615277</td>\n",
       "      <td>China</td>\n",
       "      <td>1</td>\n",
       "      <td>2020-12-12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>505</th>\n",
       "      <td>微信</td>\n",
       "      <td>4.36461</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5694634</td>\n",
       "      <td>China</td>\n",
       "      <td>1</td>\n",
       "      <td>2020-12-13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8585</th>\n",
       "      <td>个人所得税</td>\n",
       "      <td>2.84803</td>\n",
       "      <td>0.0</td>\n",
       "      <td>118325</td>\n",
       "      <td>China</td>\n",
       "      <td>1</td>\n",
       "      <td>2021-03-03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8686</th>\n",
       "      <td>个人所得税</td>\n",
       "      <td>2.84803</td>\n",
       "      <td>0.0</td>\n",
       "      <td>118325</td>\n",
       "      <td>China</td>\n",
       "      <td>1</td>\n",
       "      <td>2021-03-04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8787</th>\n",
       "      <td>个人所得税</td>\n",
       "      <td>2.84803</td>\n",
       "      <td>0.0</td>\n",
       "      <td>118325</td>\n",
       "      <td>China</td>\n",
       "      <td>1</td>\n",
       "      <td>2021-03-05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8888</th>\n",
       "      <td>个人所得税</td>\n",
       "      <td>2.84803</td>\n",
       "      <td>0.0</td>\n",
       "      <td>118325</td>\n",
       "      <td>China</td>\n",
       "      <td>1</td>\n",
       "      <td>2021-03-06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8989</th>\n",
       "      <td>个人所得税</td>\n",
       "      <td>2.84803</td>\n",
       "      <td>0.0</td>\n",
       "      <td>118325</td>\n",
       "      <td>China</td>\n",
       "      <td>1</td>\n",
       "      <td>2021-03-07</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>89 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                 name   rating price rating_count publisher_country rank  \\\n",
       "0     拼多多 - 多多买菜，百亿补贴  3.47232   0.0      1615277             China    1   \n",
       "202            农行掌上银行  3.02161   0.0        71163             China    1   \n",
       "303   拼多多 - 多多买菜，百亿补贴  3.47232   0.0      1615277             China    1   \n",
       "404   拼多多 - 多多买菜，百亿补贴  3.47232   0.0      1615277             China    1   \n",
       "505                微信  4.36461   0.0      5694634             China    1   \n",
       "...               ...      ...   ...          ...               ...  ...   \n",
       "8585            个人所得税  2.84803   0.0       118325             China    1   \n",
       "8686            个人所得税  2.84803   0.0       118325             China    1   \n",
       "8787            个人所得税  2.84803   0.0       118325             China    1   \n",
       "8888            个人所得税  2.84803   0.0       118325             China    1   \n",
       "8989            个人所得税  2.84803   0.0       118325             China    1   \n",
       "\n",
       "            date  \n",
       "0     2020-12-09  \n",
       "202   2020-12-10  \n",
       "303   2020-12-11  \n",
       "404   2020-12-12  \n",
       "505   2020-12-13  \n",
       "...          ...  \n",
       "8585  2021-03-03  \n",
       "8686  2021-03-04  \n",
       "8787  2021-03-05  \n",
       "8888  2021-03-06  \n",
       "8989  2021-03-07  \n",
       "\n",
       "[89 rows x 7 columns]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df['rank'] == '1']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 排行第一数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:48.984773Z",
     "start_time": "2021-03-28T13:55:48.948124Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'vintage':'https://assets.pyecharts.org/assets/themes/vintage'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"3dfe95663aee4479afcb6b01c81d8808\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'vintage'], function(echarts) {\n",
       "                var chart_3dfe95663aee4479afcb6b01c81d8808 = echarts.init(\n",
       "                    document.getElementById('3dfe95663aee4479afcb6b01c81d8808'), 'vintage', {renderer: 'canvas'});\n",
       "                var option_3dfe95663aee4479afcb6b01c81d8808 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"yAxisIndex\": 0,\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                2,\n",
       "                2,\n",
       "                2,\n",
       "                2,\n",
       "                3,\n",
       "                3,\n",
       "                3,\n",
       "                3,\n",
       "                3,\n",
       "                4,\n",
       "                7,\n",
       "                11,\n",
       "                12,\n",
       "                13,\n",
       "                16\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"right\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u6dd8\\u5b9d\\u7279\\u4ef7\\u7248 - \\u597d\\u8d27\\u4fbf\\u5b9c\\u4e0d\\u7528\\u62fc\",\n",
       "                \"\\u65c5\\u884c\\u9752\\u86d9\\u00b7\\u4e2d\\u56fd\\u4e4b\\u65c5\",\n",
       "                \"\\u519c\\u884c\\u638c\\u4e0a\\u94f6\\u884c\",\n",
       "                \"\\u7fe1\\u7fe0\\u5927\\u5e08\",\n",
       "                \"\\u5929\\u8c15\",\n",
       "                \"\\u526a\\u6620 - \\u8f7b\\u800c\\u6613\\u526a\",\n",
       "                \"\\u5984\\u60f3\\u5c71\\u6d77\",\n",
       "                \"\\u5feb\\u624b\\u6781\\u901f\\u7248-\\u9886\\u7ea2\\u5305 \\u770b\\u8d85\\u7ea7\\u76f4\\u64ad\",\n",
       "                \"\\u6e38\\u620f\\u738b\\uff1a\\u51b3\\u6597\\u94fe\\u63a5\",\n",
       "                \"\\u756a\\u8304\\u5c0f\\u8bf4 - \\u70ed\\u95e8\\u5168\\u672c\\u5c0f\\u8bf4\\u7535\\u5b50\\u4e66\\u9605\\u8bfb\\u5668\",\n",
       "                \"\\u652f\\u4ed8\\u5b9d - \\u751f\\u6d3b\\u597d \\u652f\\u4ed8\\u5b9d\",\n",
       "                \"\\u5f97\\u7269(\\u6bd2)-\\u6709\\u6bd2\\u7684\\u8fd0\\u52a8\\u00d7\\u6f6e\\u6d41\\u00d7\\u597d\\u7269\",\n",
       "                \"Avatarify: AI Face Animator\",\n",
       "                \"\\u4e2a\\u4eba\\u6240\\u5f97\\u7a0e\",\n",
       "                \"\\u6296\\u97f3\\u6781\\u901f\\u7248 - \\u96c6\\u97f3\\u7b26\\u5151\\u597d\\u793c\",\n",
       "                \"\\u4f7f\\u547d\\u53ec\\u5524\\u624b\\u6e38\",\n",
       "                \"\\u62fc\\u591a\\u591a - \\u591a\\u591a\\u4e70\\u83dc\\uff0c\\u767e\\u4ebf\\u8865\\u8d34\",\n",
       "                \"\\u5fae\\u4fe1\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u6392\\u884c\\u7b2c\\u4e00\\u6570\\u636e\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"grid\": [\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"left\": \"20%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_3dfe95663aee4479afcb6b01c81d8808.setOption(option_3dfe95663aee4479afcb6b01c81d8808);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x121235130>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_1 = df[df['rank'] == '1']\n",
    "result = rank_1['name'].value_counts().sort_values()\n",
    "x_data = result.index.tolist()\n",
    "y_data = result.values.tolist()\n",
    "\n",
    "b = (Bar()\n",
    "     .add_xaxis(x_data)\n",
    "     .add_yaxis('',y_data)\n",
    "     .set_global_opts(title_opts = opts.TitleOpts(title='排行第一数据'))\n",
    "     .set_series_opts(label_opts=opts.LabelOpts(is_show=True,position='right'))\n",
    "     .reversal_axis()\n",
    ")\n",
    "grid = Grid(init_opts=opts.InitOpts(theme=ThemeType.VINTAGE))\n",
    "grid.add(b, grid_opts=opts.GridOpts(pos_left=\"20%\"))\n",
    "grid.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 排行第二数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:48.997021Z",
     "start_time": "2021-03-28T13:55:48.986648Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'vintage':'https://assets.pyecharts.org/assets/themes/vintage'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"1cad8ce536c44119adf84ae9f998ca59\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'vintage'], function(echarts) {\n",
       "                var chart_1cad8ce536c44119adf84ae9f998ca59 = echarts.init(\n",
       "                    document.getElementById('1cad8ce536c44119adf84ae9f998ca59'), 'vintage', {renderer: 'canvas'});\n",
       "                var option_1cad8ce536c44119adf84ae9f998ca59 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"yAxisIndex\": 0,\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                2,\n",
       "                2,\n",
       "                2,\n",
       "                2,\n",
       "                2,\n",
       "                3,\n",
       "                4,\n",
       "                4,\n",
       "                4,\n",
       "                5,\n",
       "                6,\n",
       "                7,\n",
       "                8,\n",
       "                31\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"right\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u5feb\\u624b\\u6781\\u901f\\u7248-\\u9886\\u7ea2\\u5305 \\u770b\\u8d85\\u7ea7\\u76f4\\u64ad\",\n",
       "                \"\\u8363\\u8000\\u5927\\u5929\\u4f7f-\\u5168\\u5c4f\\u79d2\\u6740\\u4efb\\u6027\\u5927\\u7206\",\n",
       "                \"\\u756a\\u8304\\u7545\\u542c-\\u6d77\\u91cf\\u5c0f\\u8bf4\\u5168\\u573a\\u7545\\u542c\",\n",
       "                \"\\u652f\\u4ed8\\u5b9d - \\u751f\\u6d3b\\u597d \\u652f\\u4ed8\\u5b9d\",\n",
       "                \"\\u5fae\\u89c6-\\u77ed\\u89c6\\u9891\\u521b\\u4f5c\\u4e0e\\u5206\\u4eab\",\n",
       "                \"\\u5408\\u6210\\u5927\\u897f\\u74dc-\\u7eaf\\u51c0\\u7248\",\n",
       "                \"\\u8001\\u53f8\\u673a\\u5f00\\u8f66\\u4e86\",\n",
       "                \"\\u738b\\u8005\\u8363\\u8000\",\n",
       "                \"\\u6296\\u97f3\",\n",
       "                \"\\u56fd\\u5bb6\\u533b\\u4fdd\\u670d\\u52a1\\u5e73\\u53f0\",\n",
       "                \"\\u5f97\\u7269(\\u6bd2)-\\u6709\\u6bd2\\u7684\\u8fd0\\u52a8\\u00d7\\u6f6e\\u6d41\\u00d7\\u597d\\u7269\",\n",
       "                \"\\u756a\\u8304\\u5c0f\\u8bf4 - \\u70ed\\u95e8\\u5168\\u672c\\u5c0f\\u8bf4\\u7535\\u5b50\\u4e66\\u9605\\u8bfb\\u5668\",\n",
       "                \"\\u4eca\\u65e5\\u5934\\u6761\\u6781\\u901f\\u7248\",\n",
       "                \"\\u7fe1\\u7fe0\\u5927\\u5e08\",\n",
       "                \"\\u63d0\\u706f\\u4e0e\\u5730\\u4e0b\\u57ce\",\n",
       "                \"\\u6296\\u97f3\\u6781\\u901f\\u7248 - \\u96c6\\u97f3\\u7b26\\u5151\\u597d\\u793c\",\n",
       "                \"\\u6dd8\\u5b9d\\u7279\\u4ef7\\u7248 - \\u597d\\u8d27\\u4fbf\\u5b9c\\u4e0d\\u7528\\u62fc\",\n",
       "                \"\\u62fc\\u591a\\u591a - \\u591a\\u591a\\u4e70\\u83dc\\uff0c\\u767e\\u4ebf\\u8865\\u8d34\",\n",
       "                \"\\u5c0f\\u7ea2\\u4e66 \\u2013 \\u6807\\u8bb0\\u6211\\u7684\\u751f\\u6d3b\",\n",
       "                \"\\u526a\\u6620 - \\u8f7b\\u800c\\u6613\\u526a\",\n",
       "                \"\\u5fae\\u4fe1\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u6392\\u884c\\u7b2c\\u4e8c\\u6570\\u636e\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"grid\": [\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"left\": \"20%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_1cad8ce536c44119adf84ae9f998ca59.setOption(option_1cad8ce536c44119adf84ae9f998ca59);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x12128ed00>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_2 = df[df['rank'] == '2']\n",
    "result = rank_2['name'].value_counts().sort_values()\n",
    "x_data = result.index.tolist()\n",
    "y_data = result.values.tolist()\n",
    "\n",
    "b = (Bar()\n",
    "     .add_xaxis(x_data)\n",
    "     .add_yaxis('',y_data)\n",
    "     .set_global_opts(title_opts = opts.TitleOpts(title='排行第二数据'))\n",
    "     .set_series_opts(label_opts=opts.LabelOpts(is_show=True,position='right'))\n",
    "     .reversal_axis()\n",
    ")\n",
    "grid = Grid(init_opts=opts.InitOpts(theme=ThemeType.VINTAGE))\n",
    "grid.add(b, grid_opts=opts.GridOpts(pos_left=\"20%\"))\n",
    "grid.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 排行第三数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:49.011700Z",
     "start_time": "2021-03-28T13:55:49.001361Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'vintage':'https://assets.pyecharts.org/assets/themes/vintage'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"42463db942724495b52d20f357cfc655\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'vintage'], function(echarts) {\n",
       "                var chart_42463db942724495b52d20f357cfc655 = echarts.init(\n",
       "                    document.getElementById('42463db942724495b52d20f357cfc655'), 'vintage', {renderer: 'canvas'});\n",
       "                var option_42463db942724495b52d20f357cfc655 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"yAxisIndex\": 0,\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                1,\n",
       "                2,\n",
       "                2,\n",
       "                2,\n",
       "                2,\n",
       "                4,\n",
       "                4,\n",
       "                4,\n",
       "                4,\n",
       "                10,\n",
       "                12,\n",
       "                33\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"right\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u4eca\\u65e5\\u5934\\u6761\\u6781\\u901f\\u7248\",\n",
       "                \"\\u8001\\u53f8\\u673a\\u5f00\\u8f66\\u4e86\",\n",
       "                \"\\u8363\\u8000\\u5927\\u5929\\u4f7f-\\u5168\\u5c4f\\u79d2\\u6740\\u4efb\\u6027\\u5927\\u7206\",\n",
       "                \"\\u4f7f\\u547d\\u53ec\\u5524\\u624b\\u6e38\",\n",
       "                \"\\u652f\\u4ed8\\u5b9d - \\u751f\\u6d3b\\u597d \\u652f\\u4ed8\\u5b9d\",\n",
       "                \"\\u5c0f\\u7ea2\\u4e66 \\u2013 \\u6807\\u8bb0\\u6211\\u7684\\u751f\\u6d3b\",\n",
       "                \"\\u5408\\u6210\\u5927\\u897f\\u74dc!\",\n",
       "                \"\\u5fae\\u89c6-\\u77ed\\u89c6\\u9891\\u521b\\u4f5c\\u4e0e\\u5206\\u4eab\",\n",
       "                \"\\u9ad8\\u8ddf\\u6211\\u6700\\u7f8e (High Heels!)\",\n",
       "                \"\\u7fe1\\u7fe0\\u5927\\u5e08\",\n",
       "                \"\\u756a\\u8304\\u5c0f\\u8bf4 - \\u70ed\\u95e8\\u5168\\u672c\\u5c0f\\u8bf4\\u7535\\u5b50\\u4e66\\u9605\\u8bfb\\u5668\",\n",
       "                \"\\u897f\\u74dc\\u89c6\\u9891\",\n",
       "                \"\\u817e\\u8baf\\u52a0\\u901f\\u5668-\\u5403\\u9e21\\u548c\\u5e73\\u7cbe\\u82f1\\u738b\\u8005\\u624b\\u6e38\\u52a9\\u624b\",\n",
       "                \"\\u4ea4\\u7ba112123\",\n",
       "                \"\\u6296\\u97f3\\u6781\\u901f\\u7248 - \\u96c6\\u97f3\\u7b26\\u5151\\u597d\\u793c\",\n",
       "                \"\\u62fc\\u591a\\u591a - \\u591a\\u591a\\u4e70\\u83dc\\uff0c\\u767e\\u4ebf\\u8865\\u8d34\",\n",
       "                \"\\u6dd8\\u5b9d\\u7279\\u4ef7\\u7248 - \\u597d\\u8d27\\u4fbf\\u5b9c\\u4e0d\\u7528\\u62fc\",\n",
       "                \"\\u5feb\\u624b\\u6781\\u901f\\u7248-\\u9886\\u7ea2\\u5305 \\u770b\\u8d85\\u7ea7\\u76f4\\u64ad\",\n",
       "                \"\\u526a\\u6620 - \\u8f7b\\u800c\\u6613\\u526a\",\n",
       "                \"\\u5f97\\u7269(\\u6bd2)-\\u6709\\u6bd2\\u7684\\u8fd0\\u52a8\\u00d7\\u6f6e\\u6d41\\u00d7\\u597d\\u7269\",\n",
       "                \"\\u5fae\\u4fe1\",\n",
       "                \"\\u6296\\u97f3\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u6392\\u884c\\u7b2c\\u4e09\\u6570\\u636e\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"grid\": [\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"left\": \"20%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_42463db942724495b52d20f357cfc655.setOption(option_42463db942724495b52d20f357cfc655);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x12128ea00>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rank_3 = df[df['rank'] == '3']\n",
    "result = rank_3['name'].value_counts().sort_values()\n",
    "x_data = result.index.tolist()\n",
    "y_data = result.values.tolist()\n",
    "\n",
    "b = (Bar()\n",
    "     .add_xaxis(x_data)\n",
    "     .add_yaxis('',y_data)\n",
    "     .set_global_opts(title_opts = opts.TitleOpts(title='排行第三数据'))\n",
    "     .set_series_opts(label_opts=opts.LabelOpts(is_show=True,position='right'))\n",
    "     .reversal_axis()\n",
    ")\n",
    "grid = Grid(init_opts=opts.InitOpts(theme=ThemeType.VINTAGE))\n",
    "grid.add(b, grid_opts=opts.GridOpts(pos_left=\"20%\"))\n",
    "grid.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 微信排行变化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:49.026164Z",
     "start_time": "2021-03-28T13:55:49.014653Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'vintage':'https://assets.pyecharts.org/assets/themes/vintage'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"f7ef96324e8c4995ab7169a567be0a0d\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'vintage'], function(echarts) {\n",
       "                var chart_f7ef96324e8c4995ab7169a567be0a0d = echarts.init(\n",
       "                    document.getElementById('f7ef96324e8c4995ab7169a567be0a0d'), 'vintage', {renderer: 'canvas'});\n",
       "                var option_f7ef96324e8c4995ab7169a567be0a0d = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"connectNulls\": false,\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"yAxisIndex\": 0,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"2020-12-09\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-10\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-11\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-12\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-13\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-14\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-15\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-16\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-17\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-18\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-19\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-20\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-21\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-22\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-23\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-24\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-25\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-26\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-27\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-28\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-29\",\n",
       "                    \"4\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-30\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-31\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-01\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-02\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-03\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-04\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-05\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-06\",\n",
       "                    \"6\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-07\",\n",
       "                    \"4\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-08\",\n",
       "                    \"4\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-09\",\n",
       "                    \"4\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-10\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-11\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-12\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-13\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-14\",\n",
       "                    \"4\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-15\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-16\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-17\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-18\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-19\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-20\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-21\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-22\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-23\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-24\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-25\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-26\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-27\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-28\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-29\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-30\",\n",
       "                    \"4\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-31\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-01\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-02\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-03\",\n",
       "                    \"4\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-04\",\n",
       "                    \"7\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-05\",\n",
       "                    \"7\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-06\",\n",
       "                    \"8\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-07\",\n",
       "                    \"8\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-08\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-09\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-10\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-11\",\n",
       "                    \"13\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-12\",\n",
       "                    \"13\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-13\",\n",
       "                    \"12\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-14\",\n",
       "                    \"10\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-15\",\n",
       "                    \"6\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-16\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-17\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-18\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-19\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-20\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-21\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-22\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-23\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-24\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-25\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-26\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-27\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-28\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-01\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-02\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-03\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-04\",\n",
       "                    \"4\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-05\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-06\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-07\",\n",
       "                    \"2\"\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"right\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0,\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"2020-12-09\",\n",
       "                \"2020-12-10\",\n",
       "                \"2020-12-11\",\n",
       "                \"2020-12-12\",\n",
       "                \"2020-12-13\",\n",
       "                \"2020-12-14\",\n",
       "                \"2020-12-15\",\n",
       "                \"2020-12-16\",\n",
       "                \"2020-12-17\",\n",
       "                \"2020-12-18\",\n",
       "                \"2020-12-19\",\n",
       "                \"2020-12-20\",\n",
       "                \"2020-12-21\",\n",
       "                \"2020-12-22\",\n",
       "                \"2020-12-23\",\n",
       "                \"2020-12-24\",\n",
       "                \"2020-12-25\",\n",
       "                \"2020-12-26\",\n",
       "                \"2020-12-27\",\n",
       "                \"2020-12-28\",\n",
       "                \"2020-12-29\",\n",
       "                \"2020-12-30\",\n",
       "                \"2020-12-31\",\n",
       "                \"2021-01-01\",\n",
       "                \"2021-01-02\",\n",
       "                \"2021-01-03\",\n",
       "                \"2021-01-04\",\n",
       "                \"2021-01-05\",\n",
       "                \"2021-01-06\",\n",
       "                \"2021-01-07\",\n",
       "                \"2021-01-08\",\n",
       "                \"2021-01-09\",\n",
       "                \"2021-01-10\",\n",
       "                \"2021-01-11\",\n",
       "                \"2021-01-12\",\n",
       "                \"2021-01-13\",\n",
       "                \"2021-01-14\",\n",
       "                \"2021-01-15\",\n",
       "                \"2021-01-16\",\n",
       "                \"2021-01-17\",\n",
       "                \"2021-01-18\",\n",
       "                \"2021-01-19\",\n",
       "                \"2021-01-20\",\n",
       "                \"2021-01-21\",\n",
       "                \"2021-01-22\",\n",
       "                \"2021-01-23\",\n",
       "                \"2021-01-24\",\n",
       "                \"2021-01-25\",\n",
       "                \"2021-01-26\",\n",
       "                \"2021-01-27\",\n",
       "                \"2021-01-28\",\n",
       "                \"2021-01-29\",\n",
       "                \"2021-01-30\",\n",
       "                \"2021-01-31\",\n",
       "                \"2021-02-01\",\n",
       "                \"2021-02-02\",\n",
       "                \"2021-02-03\",\n",
       "                \"2021-02-04\",\n",
       "                \"2021-02-05\",\n",
       "                \"2021-02-06\",\n",
       "                \"2021-02-07\",\n",
       "                \"2021-02-08\",\n",
       "                \"2021-02-09\",\n",
       "                \"2021-02-10\",\n",
       "                \"2021-02-11\",\n",
       "                \"2021-02-12\",\n",
       "                \"2021-02-13\",\n",
       "                \"2021-02-14\",\n",
       "                \"2021-02-15\",\n",
       "                \"2021-02-16\",\n",
       "                \"2021-02-17\",\n",
       "                \"2021-02-18\",\n",
       "                \"2021-02-19\",\n",
       "                \"2021-02-20\",\n",
       "                \"2021-02-21\",\n",
       "                \"2021-02-22\",\n",
       "                \"2021-02-23\",\n",
       "                \"2021-02-24\",\n",
       "                \"2021-02-25\",\n",
       "                \"2021-02-26\",\n",
       "                \"2021-02-27\",\n",
       "                \"2021-02-28\",\n",
       "                \"2021-03-01\",\n",
       "                \"2021-03-02\",\n",
       "                \"2021-03-03\",\n",
       "                \"2021-03-04\",\n",
       "                \"2021-03-05\",\n",
       "                \"2021-03-06\",\n",
       "                \"2021-03-07\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u5fae\\u4fe1\\u6392\\u884c\\u53d8\\u5316\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"grid\": [\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"left\": \"20%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_f7ef96324e8c4995ab7169a567be0a0d.setOption(option_f7ef96324e8c4995ab7169a567be0a0d);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x107218550>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "weixin = df[df['name'] == '微信']\n",
    "y_data = weixin['rank'].values.tolist()\n",
    "x_data = weixin['date'].values.tolist()\n",
    "b = (Line()\n",
    "     .add_xaxis(x_data)\n",
    "     .add_yaxis('',y_data)\n",
    "     .set_global_opts(title_opts = opts.TitleOpts(title='微信排行变化'))\n",
    "     .set_series_opts(label_opts=opts.LabelOpts(is_show=True,position='right'))\n",
    ")\n",
    "grid = Grid(init_opts=opts.InitOpts(theme=ThemeType.VINTAGE))\n",
    "grid.add(b, grid_opts=opts.GridOpts(pos_left=\"20%\"))\n",
    "grid.render_notebook()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 拼夕夕排行变化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:49.039542Z",
     "start_time": "2021-03-28T13:55:49.028133Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'vintage':'https://assets.pyecharts.org/assets/themes/vintage'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"6bf2a6051f424497995edb82f6354106\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'vintage'], function(echarts) {\n",
       "                var chart_6bf2a6051f424497995edb82f6354106 = echarts.init(\n",
       "                    document.getElementById('6bf2a6051f424497995edb82f6354106'), 'vintage', {renderer: 'canvas'});\n",
       "                var option_6bf2a6051f424497995edb82f6354106 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"connectNulls\": false,\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"yAxisIndex\": 0,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"2020-12-09\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-10\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-11\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-12\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-13\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-14\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-15\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-16\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-17\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-18\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-19\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-20\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-21\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-22\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-23\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-24\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-25\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-26\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-27\",\n",
       "                    \"4\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-28\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-29\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-30\",\n",
       "                    \"6\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-31\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-01\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-02\",\n",
       "                    \"6\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-03\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-04\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-05\",\n",
       "                    \"7\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-06\",\n",
       "                    \"10\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-07\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-08\",\n",
       "                    \"12\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-09\",\n",
       "                    \"11\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-10\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-11\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-12\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-13\",\n",
       "                    \"12\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-14\",\n",
       "                    \"15\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-15\",\n",
       "                    \"15\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-16\",\n",
       "                    \"14\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-17\",\n",
       "                    \"12\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-18\",\n",
       "                    \"13\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-19\",\n",
       "                    \"16\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-20\",\n",
       "                    \"15\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-21\",\n",
       "                    \"16\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-22\",\n",
       "                    \"17\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-23\",\n",
       "                    \"12\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-24\",\n",
       "                    \"11\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-25\",\n",
       "                    \"12\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-26\",\n",
       "                    \"12\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-27\",\n",
       "                    \"14\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-28\",\n",
       "                    \"12\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-29\",\n",
       "                    \"15\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-30\",\n",
       "                    \"18\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-31\",\n",
       "                    \"15\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-01\",\n",
       "                    \"12\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-02\",\n",
       "                    \"12\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-03\",\n",
       "                    \"11\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-04\",\n",
       "                    \"13\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-05\",\n",
       "                    \"15\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-06\",\n",
       "                    \"14\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-07\",\n",
       "                    \"15\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-08\",\n",
       "                    \"17\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-09\",\n",
       "                    \"17\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-10\",\n",
       "                    \"14\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-11\",\n",
       "                    \"12\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-12\",\n",
       "                    \"11\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-13\",\n",
       "                    \"10\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-14\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-15\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-16\",\n",
       "                    \"7\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-17\",\n",
       "                    \"7\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-18\",\n",
       "                    \"7\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-19\",\n",
       "                    \"6\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-20\",\n",
       "                    \"4\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-21\",\n",
       "                    \"6\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-22\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-23\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-24\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-25\",\n",
       "                    \"6\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-26\",\n",
       "                    \"7\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-27\",\n",
       "                    \"8\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-28\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-01\",\n",
       "                    \"8\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-02\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-03\",\n",
       "                    \"7\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-04\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-05\",\n",
       "                    \"4\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-06\",\n",
       "                    \"4\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-07\",\n",
       "                    \"4\"\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"right\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0,\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"2020-12-09\",\n",
       "                \"2020-12-10\",\n",
       "                \"2020-12-11\",\n",
       "                \"2020-12-12\",\n",
       "                \"2020-12-13\",\n",
       "                \"2020-12-14\",\n",
       "                \"2020-12-15\",\n",
       "                \"2020-12-16\",\n",
       "                \"2020-12-17\",\n",
       "                \"2020-12-18\",\n",
       "                \"2020-12-19\",\n",
       "                \"2020-12-20\",\n",
       "                \"2020-12-21\",\n",
       "                \"2020-12-22\",\n",
       "                \"2020-12-23\",\n",
       "                \"2020-12-24\",\n",
       "                \"2020-12-25\",\n",
       "                \"2020-12-26\",\n",
       "                \"2020-12-27\",\n",
       "                \"2020-12-28\",\n",
       "                \"2020-12-29\",\n",
       "                \"2020-12-30\",\n",
       "                \"2020-12-31\",\n",
       "                \"2021-01-01\",\n",
       "                \"2021-01-02\",\n",
       "                \"2021-01-03\",\n",
       "                \"2021-01-04\",\n",
       "                \"2021-01-05\",\n",
       "                \"2021-01-06\",\n",
       "                \"2021-01-07\",\n",
       "                \"2021-01-08\",\n",
       "                \"2021-01-09\",\n",
       "                \"2021-01-10\",\n",
       "                \"2021-01-11\",\n",
       "                \"2021-01-12\",\n",
       "                \"2021-01-13\",\n",
       "                \"2021-01-14\",\n",
       "                \"2021-01-15\",\n",
       "                \"2021-01-16\",\n",
       "                \"2021-01-17\",\n",
       "                \"2021-01-18\",\n",
       "                \"2021-01-19\",\n",
       "                \"2021-01-20\",\n",
       "                \"2021-01-21\",\n",
       "                \"2021-01-22\",\n",
       "                \"2021-01-23\",\n",
       "                \"2021-01-24\",\n",
       "                \"2021-01-25\",\n",
       "                \"2021-01-26\",\n",
       "                \"2021-01-27\",\n",
       "                \"2021-01-28\",\n",
       "                \"2021-01-29\",\n",
       "                \"2021-01-30\",\n",
       "                \"2021-01-31\",\n",
       "                \"2021-02-01\",\n",
       "                \"2021-02-02\",\n",
       "                \"2021-02-03\",\n",
       "                \"2021-02-04\",\n",
       "                \"2021-02-05\",\n",
       "                \"2021-02-06\",\n",
       "                \"2021-02-07\",\n",
       "                \"2021-02-08\",\n",
       "                \"2021-02-09\",\n",
       "                \"2021-02-10\",\n",
       "                \"2021-02-11\",\n",
       "                \"2021-02-12\",\n",
       "                \"2021-02-13\",\n",
       "                \"2021-02-14\",\n",
       "                \"2021-02-15\",\n",
       "                \"2021-02-16\",\n",
       "                \"2021-02-17\",\n",
       "                \"2021-02-18\",\n",
       "                \"2021-02-19\",\n",
       "                \"2021-02-20\",\n",
       "                \"2021-02-21\",\n",
       "                \"2021-02-22\",\n",
       "                \"2021-02-23\",\n",
       "                \"2021-02-24\",\n",
       "                \"2021-02-25\",\n",
       "                \"2021-02-26\",\n",
       "                \"2021-02-27\",\n",
       "                \"2021-02-28\",\n",
       "                \"2021-03-01\",\n",
       "                \"2021-03-02\",\n",
       "                \"2021-03-03\",\n",
       "                \"2021-03-04\",\n",
       "                \"2021-03-05\",\n",
       "                \"2021-03-06\",\n",
       "                \"2021-03-07\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u62fc\\u5915\\u5915\\u6392\\u884c\\u53d8\\u5316\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"grid\": [\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"left\": \"20%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_6bf2a6051f424497995edb82f6354106.setOption(option_6bf2a6051f424497995edb82f6354106);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x12128e070>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pingduoduo = df[df['name'] == '拼多多 - 多多买菜，百亿补贴']\n",
    "y_data = pingduoduo['rank'].values.tolist()\n",
    "x_data = pingduoduo['date'].values.tolist()\n",
    "b = (Line()\n",
    "     .add_xaxis(x_data)\n",
    "     .add_yaxis('',y_data)\n",
    "     .set_global_opts(title_opts = opts.TitleOpts(title='拼夕夕排行变化'))\n",
    "     .set_series_opts(label_opts=opts.LabelOpts(is_show=True,position='right'))\n",
    ")\n",
    "grid = Grid(init_opts=opts.InitOpts(theme=ThemeType.VINTAGE))\n",
    "grid.add(b, grid_opts=opts.GridOpts(pos_left=\"20%\"))\n",
    "grid.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:49.050569Z",
     "start_time": "2021-03-28T13:55:49.041426Z"
    }
   },
   "outputs": [],
   "source": [
    "ping_reviews = pd.read_csv('data/app_analyse/pingxixi.csv', sep='|', names=['reviews'], encoding='utf-8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:49.067544Z",
     "start_time": "2021-03-28T13:55:49.052208Z"
    }
   },
   "outputs": [],
   "source": [
    "import jieba"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:50.192677Z",
     "start_time": "2021-03-28T13:55:49.069503Z"
    }
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Building prefix dict from the default dictionary ...\n",
      "Loading model from cache /var/folders/k0/hss_fhdn63l84p71mf5swlc80000gn/T/jieba.cache\n",
      "Loading model cost 0.707 seconds.\n",
      "Prefix dict has been built successfully.\n"
     ]
    }
   ],
   "source": [
    "count_list = []\n",
    "for i in ping_reviews['reviews'].values.tolist():\n",
    "    result = jieba.lcut(i)\n",
    "    for x in result:\n",
    "        count_list.append(x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:50.231719Z",
     "start_time": "2021-03-28T13:55:50.194383Z"
    }
   },
   "outputs": [],
   "source": [
    "ping_counts = {}\n",
    "stopword = [' ', '的', '，', '了', '。', '我', '都', '是', '！', '不', '给', '人', '也', '就', '你', '还', '？', '说',\n",
    "           '就是', '在', '让', '有', '买', '一个', '到', '多', '又', '这', '要', '这个', '吧', '个', '没', '用', '']\n",
    "for w in count_list:\n",
    "    if w not in stopword:\n",
    "        ping_counts[w] = ping_counts.get(w, 0) + 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:50.270845Z",
     "start_time": "2021-03-28T13:55:50.233389Z"
    }
   },
   "outputs": [],
   "source": [
    "sort_counts = sorted(ping_counts.items(), key=lambda item: item[1], reverse=True)\n",
    "# sort_counts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:50.277225Z",
     "start_time": "2021-03-28T13:55:50.273004Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['砍价，发红包等等套路等着你。什么东西啊我从来不用拼多多，就刚开始有拼多多的软件就注册过，然后朋友圈赚那些人为了赚佣金，不停的被很多人垃圾消息轰炸，都没有这个软件碍于情面还要帮下载了砍一刀，然后又卸载。这样的软件真的好吗？完全在变相刷存在感，变相骚扰。虚假宣传欺骗消费者现金签到打卡的，我每天签到好不容易够3000豆可以换30元话费了，竟然还要兑换豆才能换。明摆着欺骗消费者。垃圾货色说好了只需要邀请一个人，我都邀请十多个人了，要脸吗拼多多已经这么不要脸了么？砍完显示的金额，还剩0.01%，以后再也不显示金额了，就差0.01%，这么忽悠消费者么，剩多少还不是看你们心情，这么不透明，还天天公平正义挂嘴上，吃相太难看了吧，呵呵呵，祝你们多多加班早日飞升这种司马的软件 玩文字游戏的垃圾app，砍倒就是骗人，一刀又一刀垃圾 各种虚假宣传 垃圾中的垃圾就差0.01元 我邀请了20多个人都不算 真垃圾天天诱导消费，实际在便宜你也是在花自己的钱，看着六位数保护的少于六位数的金钱，越来越少，你就知道便宜没得捡，全是套路。套路之王拼多多。能不能不叫其他人发链接给我们拼。能不能把这个功能关了，好烦啊。亲戚发链接来叫我给他拼一下。你说不拼吧，又是长辈。不太好。真是很烦这是一个少数人能侥幸得到一点好处，多数人浪费时间和金钱的也许是骗局的东西，靠调节幸运者的数量来维持其生存，这个数量完全是他们自己说了算，最综是认可的人越来越少，绝不可能会有上市的机会，充其量就是个江湖小骗子而已。真是服了 天天领现金 明明都成功了 然后又显示还差多少 真是坑人 真是恶心死了 呸 真Tm晦气 明明该到账的钱emmm，个人觉得pdd挺好的，就不懂为啥那么多人说🌶️🐔？说什么很多假货啥啥啥的，明明又便宜又好好不好？而且客服小姐姐也很温柔，不喜欢这个软件就别诋毁我谢谢你🙏🏻🙄别再傻呵呵的被它套路了，千万别信那些能白白给你发红包的骗局。想便宜就碰碰运气，，买真货另想办法吧？套路满满，佩服佩服，，无耻至极！不黑，百亿补贴里买的玻璃水还没洗洁精兑水好用，买的裤子穿了几天裤兜坏了还把手机屏幕摔了。百亿补贴就这？天天各种弹窗，虚假宣传活动，各种套路。全是坑。QNMD。打着赚无知小白的钱的心理。祝福拼多多老总家人安好。坑人广告多烦人，再就是那个团团领现金，我邀请了二十多个人就差一分了你叫我再邀请两个新用户？现在从哪里找新用户，第一次尝试提现就玩这个，早知道就不应该为了还花呗动拼多多的邪念，消费了人情还不办事，上午搞的下午就过期了吃人软件一分都不想给什么买40返40，都是骗人的！一星都不想给，反手卸载！垃圾多多买菜垃圾平台从没见过如此厚颜无耻之人各种虚假界面，伪装成关闭按钮的广告链接，这样以欺骗开始的销售，谁敢相信有诚信可言？低三下四的廉价手段，就冲这也绝不买你们的东西，丢人现眼怎么这个平台还能坚持这么久 怎么就没有人告它 骗消费者钱 虚假宣传 引诱消费者付款 之后又说是随机 骗人的app 大家千万千万不要下载 我就是受害者泄露用户隐私我呸这种平台国家应该早点出手取缔大家赶紧删了这破软件各类活动都很坑人，提现摇红包之类的到最后都没有提成功过，都是拉好多个新用户才能给，摇红包到最后0.1元的时候根本不给钱，都是金币，活动就是骗人的不好好做产品，想着法骗人虚假宣传，欺骗消费者，强烈建议下架该产品广告太多。不必要的链接到处都是 有这闲工夫在各个平台打广告不如做好自己的软件真的是很垃圾 都别下载 根本就是人拉人的垃圾软件 应该封杀吃人肉不吐骨头的公司 卖的都是破烂假货 界面设计还能再忽悠人一些吗 恶心 🤢拼多多垃圾软件！骗人软件！我一颗星都不想给！每次搞什么好友助力提现都骗人，使劲吞刀，最后差几分钱别人一直助力一个也不显示，朋友最后差一分钱能提现时候又显示变成刮刮卡，差0.47提现，再让别人点这个0.47一次少0.01，真是恶心人！再也不会下载回来了！之前看到下三单返现活动，下完三单之后告诉我再下三单才有可能返现，垃圾软件赶紧倒闭吧欺骗消费者，欺骗消费者别怪我嘴臭，这软件就是垃圾，虚假宣传，通过欺骗用户的来方式引流，这垃圾软件怎么还不倒闭？套路太多，到处都是文字陷阱，进去就出不来了！不想占便宜的别用，想占便宜的也自己掂量掂量自己有没有那个本事。']"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ping_reviews.iloc[0].values.tolist()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:52.616974Z",
     "start_time": "2021-03-28T13:55:50.279262Z"
    }
   },
   "outputs": [],
   "source": [
    "from snownlp import SnowNLP"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:52.624481Z",
     "start_time": "2021-03-28T13:55:52.619016Z"
    }
   },
   "outputs": [],
   "source": [
    "s = SnowNLP(ping_reviews.iloc[0].values.tolist()[0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:53.132181Z",
     "start_time": "2021-03-28T13:55:52.626818Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.8335798239080019\n",
      "什么东西啊我从来不用拼多多\n",
      "0.6536341356230593\n",
      "这样的软件真的好吗\n",
      "0.5653045118127332\n",
      "还剩0.01%\n",
      "0.5239600653374081\n",
      "还天天公平正义挂嘴上\n",
      "0.6755407653910152\n",
      "呵呵呵\n",
      "0.6622222602921427\n",
      "祝你们多多加班早日飞升这种司马的软件 玩文字游戏的垃圾app\n",
      "0.9794466632832314\n",
      "看着六位数保护的少于六位数的金钱\n",
      "0.5264638521176814\n",
      "越来越少\n",
      "0.6546253620249376\n",
      "你就知道便宜没得捡\n",
      "0.7972447375321737\n",
      "套路之王拼多多\n",
      "0.875\n",
      "又是长辈\n",
      "0.7978232650627637\n",
      "最综是认可的人越来越少\n",
      "0.7657217694747187\n",
      "绝不可能会有上市的机会\n",
      "0.8385292481911915\n",
      "个人觉得pdd挺好的\n",
      "0.5604963860619827\n",
      "明明又便宜又好好不好\n",
      "0.6880962436791889\n",
      "而且客服小姐姐也很温柔\n",
      "0.6959550417314792\n",
      "想便宜就碰碰运气\n",
      "0.8427678969198102\n",
      "佩服佩服\n",
      "0.7132613853682676\n",
      "买的裤子穿了几天裤兜坏了还把手机屏幕摔了\n",
      "0.5286723934760359\n",
      "打着赚无知小白的钱的心理\n",
      "0.9341358158482167\n",
      "祝福拼多多老总家人安好\n",
      "0.8935298451146301\n",
      "第一次尝试提现就玩这个\n",
      "0.7683734606808105\n",
      "都是金币\n",
      "0.9245493974249648\n",
      "每次搞什么好友助力提现都骗人\n",
      "0.644881681223086\n",
      "之前看到下三单返现活动\n"
     ]
    }
   ],
   "source": [
    "for sentence in s.sentences:\n",
    "    s1 = SnowNLP(sentence).sentiments\n",
    "    if s1 > 0.5:\n",
    "        print(SnowNLP(sentence).sentiments)\n",
    "        print(sentence)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:53.145609Z",
     "start_time": "2021-03-28T13:55:53.134125Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'vintage':'https://assets.pyecharts.org/assets/themes/vintage'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"793c8575971940d0b6a0bd6767cd9896\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'vintage'], function(echarts) {\n",
       "                var chart_793c8575971940d0b6a0bd6767cd9896 = echarts.init(\n",
       "                    document.getElementById('793c8575971940d0b6a0bd6767cd9896'), 'vintage', {renderer: 'canvas'});\n",
       "                var option_793c8575971940d0b6a0bd6767cd9896 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"connectNulls\": false,\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"yAxisIndex\": 0,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"2020-12-25\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-26\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-27\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-28\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-29\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-30\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-31\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-01\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-02\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-03\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-04\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-05\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-06\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-07\",\n",
       "                    \"12\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-08\",\n",
       "                    \"13\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-09\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-10\",\n",
       "                    \"12\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-11\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-12\",\n",
       "                    \"14\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-13\",\n",
       "                    \"15\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-14\",\n",
       "                    \"18\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-15\",\n",
       "                    \"20\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-16\",\n",
       "                    \"20\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-17\",\n",
       "                    \"23\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-18\",\n",
       "                    \"25\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-19\",\n",
       "                    \"33\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-20\",\n",
       "                    \"34\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-21\",\n",
       "                    \"36\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-22\",\n",
       "                    \"36\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-23\",\n",
       "                    \"32\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-24\",\n",
       "                    \"31\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-25\",\n",
       "                    \"31\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-26\",\n",
       "                    \"34\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-27\",\n",
       "                    \"35\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-28\",\n",
       "                    \"37\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-29\",\n",
       "                    \"43\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-30\",\n",
       "                    \"45\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-31\",\n",
       "                    \"45\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-01\",\n",
       "                    \"45\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-02\",\n",
       "                    \"50\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-03\",\n",
       "                    \"51\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-04\",\n",
       "                    \"49\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-05\",\n",
       "                    \"53\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-06\",\n",
       "                    \"39\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-07\",\n",
       "                    \"48\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-08\",\n",
       "                    \"56\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-09\",\n",
       "                    \"61\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-10\",\n",
       "                    \"59\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-11\",\n",
       "                    \"51\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-12\",\n",
       "                    \"45\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-13\",\n",
       "                    \"46\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-14\",\n",
       "                    \"60\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-15\",\n",
       "                    \"70\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-16\",\n",
       "                    \"73\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-17\",\n",
       "                    \"70\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-18\",\n",
       "                    \"90\"\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"right\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0,\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"2020-12-25\",\n",
       "                \"2020-12-26\",\n",
       "                \"2020-12-27\",\n",
       "                \"2020-12-28\",\n",
       "                \"2020-12-29\",\n",
       "                \"2020-12-30\",\n",
       "                \"2020-12-31\",\n",
       "                \"2021-01-01\",\n",
       "                \"2021-01-02\",\n",
       "                \"2021-01-03\",\n",
       "                \"2021-01-04\",\n",
       "                \"2021-01-05\",\n",
       "                \"2021-01-06\",\n",
       "                \"2021-01-07\",\n",
       "                \"2021-01-08\",\n",
       "                \"2021-01-09\",\n",
       "                \"2021-01-10\",\n",
       "                \"2021-01-11\",\n",
       "                \"2021-01-12\",\n",
       "                \"2021-01-13\",\n",
       "                \"2021-01-14\",\n",
       "                \"2021-01-15\",\n",
       "                \"2021-01-16\",\n",
       "                \"2021-01-17\",\n",
       "                \"2021-01-18\",\n",
       "                \"2021-01-19\",\n",
       "                \"2021-01-20\",\n",
       "                \"2021-01-21\",\n",
       "                \"2021-01-22\",\n",
       "                \"2021-01-23\",\n",
       "                \"2021-01-24\",\n",
       "                \"2021-01-25\",\n",
       "                \"2021-01-26\",\n",
       "                \"2021-01-27\",\n",
       "                \"2021-01-28\",\n",
       "                \"2021-01-29\",\n",
       "                \"2021-01-30\",\n",
       "                \"2021-01-31\",\n",
       "                \"2021-02-01\",\n",
       "                \"2021-02-02\",\n",
       "                \"2021-02-03\",\n",
       "                \"2021-02-04\",\n",
       "                \"2021-02-05\",\n",
       "                \"2021-02-06\",\n",
       "                \"2021-02-07\",\n",
       "                \"2021-02-08\",\n",
       "                \"2021-02-09\",\n",
       "                \"2021-02-10\",\n",
       "                \"2021-02-11\",\n",
       "                \"2021-02-12\",\n",
       "                \"2021-02-13\",\n",
       "                \"2021-02-14\",\n",
       "                \"2021-02-15\",\n",
       "                \"2021-02-16\",\n",
       "                \"2021-02-17\",\n",
       "                \"2021-02-18\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4f7f\\u547d\\u53ec\\u5524\\u624b\\u6e38\\u6392\\u884c\\u53d8\\u5316\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"grid\": [\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"left\": \"20%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_793c8575971940d0b6a0bd6767cd9896.setOption(option_793c8575971940d0b6a0bd6767cd9896);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x13a328c40>"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "shimingzhaohuan = df[df['name'] == '使命召唤手游']\n",
    "y_data = shimingzhaohuan['rank'].values.tolist()\n",
    "x_data = shimingzhaohuan['date'].values.tolist()\n",
    "b = (Line()\n",
    "     .add_xaxis(x_data)\n",
    "     .add_yaxis('',y_data)\n",
    "     .set_global_opts(title_opts = opts.TitleOpts(title='使命召唤手游排行变化'))\n",
    "     .set_series_opts(label_opts=opts.LabelOpts(is_show=True,position='right'))\n",
    ")\n",
    "grid = Grid(init_opts=opts.InitOpts(theme=ThemeType.VINTAGE))\n",
    "grid.add(b, grid_opts=opts.GridOpts(pos_left=\"20%\"))\n",
    "grid.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:53.160098Z",
     "start_time": "2021-03-28T13:55:53.147566Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'vintage':'https://assets.pyecharts.org/assets/themes/vintage'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"bae816de2e99452fbf3a313793b5cc7b\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'vintage'], function(echarts) {\n",
       "                var chart_bae816de2e99452fbf3a313793b5cc7b = echarts.init(\n",
       "                    document.getElementById('bae816de2e99452fbf3a313793b5cc7b'), 'vintage', {renderer: 'canvas'});\n",
       "                var option_bae816de2e99452fbf3a313793b5cc7b = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"connectNulls\": false,\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"yAxisIndex\": 0,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"2020-12-09\",\n",
       "                    \"38\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-10\",\n",
       "                    \"36\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-11\",\n",
       "                    \"36\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-12\",\n",
       "                    \"32\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-13\",\n",
       "                    \"28\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-14\",\n",
       "                    \"30\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-15\",\n",
       "                    \"38\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-16\",\n",
       "                    \"38\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-17\",\n",
       "                    \"41\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-18\",\n",
       "                    \"46\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-19\",\n",
       "                    \"35\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-20\",\n",
       "                    \"33\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-21\",\n",
       "                    \"35\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-22\",\n",
       "                    \"37\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-23\",\n",
       "                    \"39\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-24\",\n",
       "                    \"37\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-25\",\n",
       "                    \"41\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-26\",\n",
       "                    \"28\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-27\",\n",
       "                    \"27\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-28\",\n",
       "                    \"28\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-29\",\n",
       "                    \"29\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-30\",\n",
       "                    \"32\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-31\",\n",
       "                    \"33\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-01\",\n",
       "                    \"17\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-02\",\n",
       "                    \"11\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-03\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-04\",\n",
       "                    \"8\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-05\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-06\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-07\",\n",
       "                    \"8\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-08\",\n",
       "                    \"11\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-09\",\n",
       "                    \"12\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-10\",\n",
       "                    \"10\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-11\",\n",
       "                    \"8\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-12\",\n",
       "                    \"7\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-13\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-14\",\n",
       "                    \"8\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-15\",\n",
       "                    \"12\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-16\",\n",
       "                    \"11\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-17\",\n",
       "                    \"10\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-18\",\n",
       "                    \"8\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-19\",\n",
       "                    \"10\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-20\",\n",
       "                    \"10\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-21\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-22\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-23\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-24\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-25\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-26\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-27\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-28\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-29\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-30\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-31\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-01\",\n",
       "                    \"4\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-02\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-03\",\n",
       "                    \"2\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-04\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-05\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-06\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-07\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-08\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-09\",\n",
       "                    \"4\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-10\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-11\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-12\",\n",
       "                    \"5\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-13\",\n",
       "                    \"6\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-14\",\n",
       "                    \"6\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-15\",\n",
       "                    \"7\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-16\",\n",
       "                    \"10\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-17\",\n",
       "                    \"17\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-18\",\n",
       "                    \"14\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-19\",\n",
       "                    \"17\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-20\",\n",
       "                    \"13\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-21\",\n",
       "                    \"17\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-22\",\n",
       "                    \"16\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-23\",\n",
       "                    \"12\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-24\",\n",
       "                    \"7\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-25\",\n",
       "                    \"8\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-26\",\n",
       "                    \"8\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-27\",\n",
       "                    \"7\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-28\",\n",
       "                    \"3\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-01\",\n",
       "                    \"4\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-02\",\n",
       "                    \"4\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-03\",\n",
       "                    \"9\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-04\",\n",
       "                    \"16\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-05\",\n",
       "                    \"21\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-06\",\n",
       "                    \"24\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-07\",\n",
       "                    \"23\"\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"right\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0,\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"2020-12-09\",\n",
       "                \"2020-12-10\",\n",
       "                \"2020-12-11\",\n",
       "                \"2020-12-12\",\n",
       "                \"2020-12-13\",\n",
       "                \"2020-12-14\",\n",
       "                \"2020-12-15\",\n",
       "                \"2020-12-16\",\n",
       "                \"2020-12-17\",\n",
       "                \"2020-12-18\",\n",
       "                \"2020-12-19\",\n",
       "                \"2020-12-20\",\n",
       "                \"2020-12-21\",\n",
       "                \"2020-12-22\",\n",
       "                \"2020-12-23\",\n",
       "                \"2020-12-24\",\n",
       "                \"2020-12-25\",\n",
       "                \"2020-12-26\",\n",
       "                \"2020-12-27\",\n",
       "                \"2020-12-28\",\n",
       "                \"2020-12-29\",\n",
       "                \"2020-12-30\",\n",
       "                \"2020-12-31\",\n",
       "                \"2021-01-01\",\n",
       "                \"2021-01-02\",\n",
       "                \"2021-01-03\",\n",
       "                \"2021-01-04\",\n",
       "                \"2021-01-05\",\n",
       "                \"2021-01-06\",\n",
       "                \"2021-01-07\",\n",
       "                \"2021-01-08\",\n",
       "                \"2021-01-09\",\n",
       "                \"2021-01-10\",\n",
       "                \"2021-01-11\",\n",
       "                \"2021-01-12\",\n",
       "                \"2021-01-13\",\n",
       "                \"2021-01-14\",\n",
       "                \"2021-01-15\",\n",
       "                \"2021-01-16\",\n",
       "                \"2021-01-17\",\n",
       "                \"2021-01-18\",\n",
       "                \"2021-01-19\",\n",
       "                \"2021-01-20\",\n",
       "                \"2021-01-21\",\n",
       "                \"2021-01-22\",\n",
       "                \"2021-01-23\",\n",
       "                \"2021-01-24\",\n",
       "                \"2021-01-25\",\n",
       "                \"2021-01-26\",\n",
       "                \"2021-01-27\",\n",
       "                \"2021-01-28\",\n",
       "                \"2021-01-29\",\n",
       "                \"2021-01-30\",\n",
       "                \"2021-01-31\",\n",
       "                \"2021-02-01\",\n",
       "                \"2021-02-02\",\n",
       "                \"2021-02-03\",\n",
       "                \"2021-02-04\",\n",
       "                \"2021-02-05\",\n",
       "                \"2021-02-06\",\n",
       "                \"2021-02-07\",\n",
       "                \"2021-02-08\",\n",
       "                \"2021-02-09\",\n",
       "                \"2021-02-10\",\n",
       "                \"2021-02-11\",\n",
       "                \"2021-02-12\",\n",
       "                \"2021-02-13\",\n",
       "                \"2021-02-14\",\n",
       "                \"2021-02-15\",\n",
       "                \"2021-02-16\",\n",
       "                \"2021-02-17\",\n",
       "                \"2021-02-18\",\n",
       "                \"2021-02-19\",\n",
       "                \"2021-02-20\",\n",
       "                \"2021-02-21\",\n",
       "                \"2021-02-22\",\n",
       "                \"2021-02-23\",\n",
       "                \"2021-02-24\",\n",
       "                \"2021-02-25\",\n",
       "                \"2021-02-26\",\n",
       "                \"2021-02-27\",\n",
       "                \"2021-02-28\",\n",
       "                \"2021-03-01\",\n",
       "                \"2021-03-02\",\n",
       "                \"2021-03-03\",\n",
       "                \"2021-03-04\",\n",
       "                \"2021-03-05\",\n",
       "                \"2021-03-06\",\n",
       "                \"2021-03-07\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u6296\\u97f3\\u6781\\u901f\\u7248\\u6392\\u884c\\u53d8\\u5316\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"grid\": [\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"left\": \"20%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_bae816de2e99452fbf3a313793b5cc7b.setOption(option_bae816de2e99452fbf3a313793b5cc7b);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x13a3be910>"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "douyinjisuban = df[df['name'] == '抖音极速版 - 集音符兑好礼']\n",
    "y_data = douyinjisuban['rank'].values.tolist()\n",
    "x_data = douyinjisuban['date'].values.tolist()\n",
    "b = (Line()\n",
    "     .add_xaxis(x_data)\n",
    "     .add_yaxis('',y_data)\n",
    "     .set_global_opts(title_opts = opts.TitleOpts(title='抖音极速版排行变化'))\n",
    "     .set_series_opts(label_opts=opts.LabelOpts(is_show=True,position='right'))\n",
    ")\n",
    "grid = Grid(init_opts=opts.InitOpts(theme=ThemeType.VINTAGE))\n",
    "grid.add(b, grid_opts=opts.GridOpts(pos_left=\"20%\"))\n",
    "grid.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:53.173960Z",
     "start_time": "2021-03-28T13:55:53.162299Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'vintage':'https://assets.pyecharts.org/assets/themes/vintage'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"731f0a6982c3447cbcab27e43eecc63c\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'vintage'], function(echarts) {\n",
       "                var chart_731f0a6982c3447cbcab27e43eecc63c = echarts.init(\n",
       "                    document.getElementById('731f0a6982c3447cbcab27e43eecc63c'), 'vintage', {renderer: 'canvas'});\n",
       "                var option_731f0a6982c3447cbcab27e43eecc63c = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"line\",\n",
       "            \"connectNulls\": false,\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"yAxisIndex\": 0,\n",
       "            \"symbolSize\": 4,\n",
       "            \"showSymbol\": true,\n",
       "            \"smooth\": false,\n",
       "            \"clip\": true,\n",
       "            \"step\": false,\n",
       "            \"data\": [\n",
       "                [\n",
       "                    \"2020-12-09\",\n",
       "                    \"24\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-10\",\n",
       "                    \"24\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-11\",\n",
       "                    \"28\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-12\",\n",
       "                    \"56\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-13\",\n",
       "                    \"87\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-14\",\n",
       "                    \"55\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-15\",\n",
       "                    \"30\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-16\",\n",
       "                    \"31\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-17\",\n",
       "                    \"27\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-18\",\n",
       "                    \"32\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-19\",\n",
       "                    \"70\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-20\",\n",
       "                    \"96\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-21\",\n",
       "                    \"60\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-22\",\n",
       "                    \"43\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-23\",\n",
       "                    \"37\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-24\",\n",
       "                    \"36\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-25\",\n",
       "                    \"44\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-26\",\n",
       "                    \"69\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-27\",\n",
       "                    \"100\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-28\",\n",
       "                    \"56\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-29\",\n",
       "                    \"33\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-30\",\n",
       "                    \"27\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2020-12-31\",\n",
       "                    \"26\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-01\",\n",
       "                    \"58\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-04\",\n",
       "                    \"99\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-05\",\n",
       "                    \"87\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-06\",\n",
       "                    \"88\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-07\",\n",
       "                    \"83\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-08\",\n",
       "                    \"82\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-11\",\n",
       "                    \"98\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-12\",\n",
       "                    \"88\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-13\",\n",
       "                    \"80\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-14\",\n",
       "                    \"71\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-15\",\n",
       "                    \"65\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-18\",\n",
       "                    \"98\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-19\",\n",
       "                    \"73\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-20\",\n",
       "                    \"69\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-01-21\",\n",
       "                    \"86\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-02\",\n",
       "                    \"99\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-03\",\n",
       "                    \"90\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-04\",\n",
       "                    \"90\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-05\",\n",
       "                    \"93\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-22\",\n",
       "                    \"98\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-02-23\",\n",
       "                    \"93\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-01\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-02\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-03\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-04\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-05\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-06\",\n",
       "                    \"1\"\n",
       "                ],\n",
       "                [\n",
       "                    \"2021-03-07\",\n",
       "                    \"1\"\n",
       "                ]\n",
       "            ],\n",
       "            \"hoverAnimation\": true,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"right\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 0,\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"2020-12-09\",\n",
       "                \"2020-12-10\",\n",
       "                \"2020-12-11\",\n",
       "                \"2020-12-12\",\n",
       "                \"2020-12-13\",\n",
       "                \"2020-12-14\",\n",
       "                \"2020-12-15\",\n",
       "                \"2020-12-16\",\n",
       "                \"2020-12-17\",\n",
       "                \"2020-12-18\",\n",
       "                \"2020-12-19\",\n",
       "                \"2020-12-20\",\n",
       "                \"2020-12-21\",\n",
       "                \"2020-12-22\",\n",
       "                \"2020-12-23\",\n",
       "                \"2020-12-24\",\n",
       "                \"2020-12-25\",\n",
       "                \"2020-12-26\",\n",
       "                \"2020-12-27\",\n",
       "                \"2020-12-28\",\n",
       "                \"2020-12-29\",\n",
       "                \"2020-12-30\",\n",
       "                \"2020-12-31\",\n",
       "                \"2021-01-01\",\n",
       "                \"2021-01-04\",\n",
       "                \"2021-01-05\",\n",
       "                \"2021-01-06\",\n",
       "                \"2021-01-07\",\n",
       "                \"2021-01-08\",\n",
       "                \"2021-01-11\",\n",
       "                \"2021-01-12\",\n",
       "                \"2021-01-13\",\n",
       "                \"2021-01-14\",\n",
       "                \"2021-01-15\",\n",
       "                \"2021-01-18\",\n",
       "                \"2021-01-19\",\n",
       "                \"2021-01-20\",\n",
       "                \"2021-01-21\",\n",
       "                \"2021-02-02\",\n",
       "                \"2021-02-03\",\n",
       "                \"2021-02-04\",\n",
       "                \"2021-02-05\",\n",
       "                \"2021-02-22\",\n",
       "                \"2021-02-23\",\n",
       "                \"2021-03-01\",\n",
       "                \"2021-03-02\",\n",
       "                \"2021-03-03\",\n",
       "                \"2021-03-04\",\n",
       "                \"2021-03-05\",\n",
       "                \"2021-03-06\",\n",
       "                \"2021-03-07\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u4e2a\\u4eba\\u6240\\u5f97\\u7a0e\\u6392\\u884c\\u53d8\\u5316\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"grid\": [\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"left\": \"20%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_731f0a6982c3447cbcab27e43eecc63c.setOption(option_731f0a6982c3447cbcab27e43eecc63c);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x13a3dbd00>"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gerensuodeshui = df[df['name'] == '个人所得税']\n",
    "y_data = gerensuodeshui['rank'].values.tolist()\n",
    "x_data = gerensuodeshui['date'].values.tolist()\n",
    "b = (Line()\n",
    "     .add_xaxis(x_data)\n",
    "     .add_yaxis('',y_data)\n",
    "     .set_global_opts(title_opts = opts.TitleOpts(title='个人所得税排行变化'))\n",
    "     .set_series_opts(label_opts=opts.LabelOpts(is_show=True,position='right'))\n",
    ")\n",
    "grid = Grid(init_opts=opts.InitOpts(theme=ThemeType.VINTAGE))\n",
    "grid.add(b, grid_opts=opts.GridOpts(pos_left=\"20%\"))\n",
    "grid.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:53.197658Z",
     "start_time": "2021-03-28T13:55:53.180534Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>rating</th>\n",
       "      <th>price</th>\n",
       "      <th>rating_count</th>\n",
       "      <th>publisher_country</th>\n",
       "      <th>rank</th>\n",
       "      <th>date</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>100</th>\n",
       "      <td>name</td>\n",
       "      <td>rating</td>\n",
       "      <td>price</td>\n",
       "      <td>rating_count</td>\n",
       "      <td>publisher_country</td>\n",
       "      <td>rank</td>\n",
       "      <td>date</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6746</th>\n",
       "      <td>急速大作战</td>\n",
       "      <td>4.98113</td>\n",
       "      <td>0.0</td>\n",
       "      <td>530</td>\n",
       "      <td>None</td>\n",
       "      <td>81</td>\n",
       "      <td>2021-02-12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2400</th>\n",
       "      <td>快影-创作有趣的视频</td>\n",
       "      <td>4.96913</td>\n",
       "      <td>0.0</td>\n",
       "      <td>807285</td>\n",
       "      <td>China</td>\n",
       "      <td>78</td>\n",
       "      <td>2020-12-31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>487</th>\n",
       "      <td>盒马 - 鲜美生活</td>\n",
       "      <td>4.96706</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1753833</td>\n",
       "      <td>None</td>\n",
       "      <td>84</td>\n",
       "      <td>2020-12-12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8273</th>\n",
       "      <td>魔龙消消乐-谜题大陆</td>\n",
       "      <td>4.96655</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5381</td>\n",
       "      <td>None</td>\n",
       "      <td>93</td>\n",
       "      <td>2021-02-27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6749</th>\n",
       "      <td>全民来找茬-老少皆宜</td>\n",
       "      <td>1.87176</td>\n",
       "      <td>0.0</td>\n",
       "      <td>733</td>\n",
       "      <td>None</td>\n",
       "      <td>84</td>\n",
       "      <td>2021-02-12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>62</th>\n",
       "      <td>国家医保服务平台</td>\n",
       "      <td>1.71485</td>\n",
       "      <td>0.0</td>\n",
       "      <td>2553</td>\n",
       "      <td>None</td>\n",
       "      <td>63</td>\n",
       "      <td>2020-12-09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3430</th>\n",
       "      <td>辽事通</td>\n",
       "      <td>1.67294</td>\n",
       "      <td>0.0</td>\n",
       "      <td>3770</td>\n",
       "      <td>None</td>\n",
       "      <td>98</td>\n",
       "      <td>2021-01-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>学习强国</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>China</td>\n",
       "      <td>97</td>\n",
       "      <td>2020-12-09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8923</th>\n",
       "      <td>地下城归来-诸神觉醒</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>36</td>\n",
       "      <td>2021-03-06</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>329 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            name   rating  price  rating_count  publisher_country  rank  \\\n",
       "100         name   rating  price  rating_count  publisher_country  rank   \n",
       "6746       急速大作战  4.98113    0.0           530               None    81   \n",
       "2400  快影-创作有趣的视频  4.96913    0.0        807285              China    78   \n",
       "487    盒马 - 鲜美生活  4.96706    0.0       1753833               None    84   \n",
       "8273  魔龙消消乐-谜题大陆  4.96655    0.0          5381               None    93   \n",
       "...          ...      ...    ...           ...                ...   ...   \n",
       "6749  全民来找茬-老少皆宜  1.87176    0.0           733               None    84   \n",
       "62      国家医保服务平台  1.71485    0.0          2553               None    63   \n",
       "3430         辽事通  1.67294    0.0          3770               None    98   \n",
       "96          学习强国      0.0    0.0             0              China    97   \n",
       "8923  地下城归来-诸神觉醒      0.0    0.0             0               None    36   \n",
       "\n",
       "            date  \n",
       "100         date  \n",
       "6746  2021-02-12  \n",
       "2400  2020-12-31  \n",
       "487   2020-12-12  \n",
       "8273  2021-02-27  \n",
       "...          ...  \n",
       "6749  2021-02-12  \n",
       "62    2020-12-09  \n",
       "3430  2021-01-10  \n",
       "96    2020-12-09  \n",
       "8923  2021-03-06  \n",
       "\n",
       "[329 rows x 7 columns]"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_ranting = df.drop_duplicates(subset=['name', 'rating'])\n",
    "\n",
    "df_ranting.sort_values(by='rating', ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:53.212656Z",
     "start_time": "2021-03-28T13:55:53.202508Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'vintage':'https://assets.pyecharts.org/assets/themes/vintage'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"90766bd954ba44919270852548f72326\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'vintage'], function(echarts) {\n",
       "                var chart_90766bd954ba44919270852548f72326 = echarts.init(\n",
       "                    document.getElementById('90766bd954ba44919270852548f72326'), 'vintage', {renderer: 'canvas'});\n",
       "                var option_90766bd954ba44919270852548f72326 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"yAxisIndex\": 0,\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                \"4.98113\",\n",
       "                \"4.96913\",\n",
       "                \"4.96706\",\n",
       "                \"4.96655\",\n",
       "                \"4.96088\",\n",
       "                \"4.95097\",\n",
       "                \"4.94723\",\n",
       "                \"4.93954\",\n",
       "                \"4.93426\",\n",
       "                \"4.93422\"\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"right\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"min\": 4.9,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u6025\\u901f\\u5927\\u4f5c\\u6218\",\n",
       "                \"\\u5feb\\u5f71-\\u521b\\u4f5c\\u6709\\u8da3\\u7684\\u89c6\\u9891\",\n",
       "                \"\\u76d2\\u9a6c - \\u9c9c\\u7f8e\\u751f\\u6d3b\",\n",
       "                \"\\u9b54\\u9f99\\u6d88\\u6d88\\u4e50-\\u8c1c\\u9898\\u5927\\u9646\",\n",
       "                \"\\u9a7e\\u8003\\u5b9d\\u5178-2021\\u9a7e\\u6821\\u5b66\\u8f66\\u8003\\u9a7e\\u7167\\u4e00\\u70b9\\u901a\",\n",
       "                \"\\u4e00\\u751c\\u76f8\\u673a - \\u6f2b\\u753b\\u8138&\\u98ce\\u683c\\u81ea\\u62cd\",\n",
       "                \"\\u5c0f\\u7ea2\\u4e66 \\u2013 \\u6807\\u8bb0\\u6211\\u7684\\u751f\\u6d3b\",\n",
       "                \"\\u4eca\\u5929\\u8fd0\\u6c14\\u771f\\u597d\",\n",
       "                \"\\u626b\\u63cf\\u5168\\u80fd\\u738b-\\u626b\\u63cf\\u4eeaPDF,\\u56fe\\u7247\\u8f6c\\u6587\\u5b57\",\n",
       "                \"\\u626b\\u63cf\\u5168\\u80fd\\u738b-\\u626b\\u63cf\\u4eeaPDF,\\u56fe\\u7247\\u8f6c\\u6587\\u5b57\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"Star\\uff08\\u53e3\\u7891\\uff09 \\u6392\\u884c\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"grid\": [\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"left\": \"20%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_90766bd954ba44919270852548f72326.setOption(option_90766bd954ba44919270852548f72326);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x13a3be220>"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_ranting_sort = df_ranting.sort_values(by='rating', ascending=False)\n",
    "x_data = df_ranting_sort['name'][1:11].values.tolist()\n",
    "y_data = df_ranting_sort['rating'][1:11].values.tolist()\n",
    "\n",
    "b = (Bar()\n",
    "     .add_xaxis(x_data)\n",
    "     .add_yaxis('',y_data)\n",
    "     .set_global_opts(title_opts = opts.TitleOpts(title='Star（口碑） 排行'), xaxis_opts=opts.AxisOpts(min_=4.9))\n",
    "     .set_series_opts(label_opts=opts.LabelOpts(is_show=True,position='right'))\n",
    "     .reversal_axis()\n",
    ")\n",
    "grid = Grid(init_opts=opts.InitOpts(theme=ThemeType.VINTAGE))\n",
    "grid.add(b, grid_opts=opts.GridOpts(pos_left=\"20%\"))\n",
    "grid.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-03-28T13:55:53.225261Z",
     "start_time": "2021-03-28T13:55:53.214557Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min', 'vintage':'https://assets.pyecharts.org/assets/themes/vintage'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"2734a775f1d641d4a82341fcaf878f2f\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts', 'vintage'], function(echarts) {\n",
       "                var chart_2734a775f1d641d4a82341fcaf878f2f = echarts.init(\n",
       "                    document.getElementById('2734a775f1d641d4a82341fcaf878f2f'), 'vintage', {renderer: 'canvas'});\n",
       "                var option_2734a775f1d641d4a82341fcaf878f2f = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"bar\",\n",
       "            \"xAxisIndex\": 0,\n",
       "            \"yAxisIndex\": 0,\n",
       "            \"legendHoverLink\": true,\n",
       "            \"data\": [\n",
       "                \"4.92895\",\n",
       "                \"4.91824\",\n",
       "                \"4.91732\",\n",
       "                \"4.91715\",\n",
       "                \"4.91714\",\n",
       "                \"4.91657\",\n",
       "                \"4.9157\",\n",
       "                \"4.9135\",\n",
       "                \"4.91348\",\n",
       "                \"4.91346\"\n",
       "            ],\n",
       "            \"showBackground\": false,\n",
       "            \"barMinHeight\": 0,\n",
       "            \"barCategoryGap\": \"20%\",\n",
       "            \"barGap\": \"30%\",\n",
       "            \"large\": false,\n",
       "            \"largeThreshold\": 400,\n",
       "            \"seriesLayoutBy\": \"column\",\n",
       "            \"datasetIndex\": 0,\n",
       "            \"clip\": true,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"right\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"xAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"min\": 4.9,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"yAxis\": [\n",
       "        {\n",
       "            \"show\": true,\n",
       "            \"scale\": false,\n",
       "            \"nameLocation\": \"end\",\n",
       "            \"nameGap\": 15,\n",
       "            \"gridIndex\": 0,\n",
       "            \"inverse\": false,\n",
       "            \"offset\": 0,\n",
       "            \"splitNumber\": 5,\n",
       "            \"minInterval\": 0,\n",
       "            \"splitLine\": {\n",
       "                \"show\": false,\n",
       "                \"lineStyle\": {\n",
       "                    \"show\": true,\n",
       "                    \"width\": 1,\n",
       "                    \"opacity\": 1,\n",
       "                    \"curveness\": 0,\n",
       "                    \"type\": \"solid\"\n",
       "                }\n",
       "            },\n",
       "            \"data\": [\n",
       "                \"\\u4ea4\\u7ba112123\",\n",
       "                \"\\u5feb\\u770b\\u70b9\",\n",
       "                \"\\u5927\\u4f17\\u70b9\\u8bc4-\\u53d1\\u73b0\\u54c1\\u8d28\\u751f\\u6d3b\",\n",
       "                \"\\u526a\\u6620 - \\u8f7b\\u800c\\u6613\\u526a\",\n",
       "                \"\\u526a\\u6620 - \\u8f7b\\u800c\\u6613\\u526a\",\n",
       "                \"\\u54aa\\u5495\\u97f3\\u4e50-\\u8ba9\\u97f3\\u4e50\\u66f4\\u6709\\u8da3\",\n",
       "                \"\\u4eac\\u4e1c\\u5230\\u5bb6-\\u4e70\\u83dc\\u8d85\\u5e02\\u751f\\u9c9c\\u5916\\u5356\\u9001\\u836f\\u5230\\u5bb6\",\n",
       "                \"\\u6296\\u97f3\",\n",
       "                \"\\u6296\\u97f3\",\n",
       "                \"\\u62db\\u5546\\u94f6\\u884c\"\n",
       "            ]\n",
       "        }\n",
       "    ],\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"Star\\uff08\\u53e3\\u7891\\uff09 \\u6392\\u884c\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ],\n",
       "    \"grid\": [\n",
       "        {\n",
       "            \"show\": false,\n",
       "            \"zlevel\": 0,\n",
       "            \"z\": 2,\n",
       "            \"left\": \"20%\",\n",
       "            \"containLabel\": false,\n",
       "            \"backgroundColor\": \"transparent\",\n",
       "            \"borderColor\": \"#ccc\",\n",
       "            \"borderWidth\": 1\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_2734a775f1d641d4a82341fcaf878f2f.setOption(option_2734a775f1d641d4a82341fcaf878f2f);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x12126d460>"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_ranting_sort = df_ranting.sort_values(by='rating', ascending=False)\n",
    "x_data = df_ranting_sort['name'][11:21].values.tolist()\n",
    "y_data = df_ranting_sort['rating'][11:21].values.tolist()\n",
    "\n",
    "b = (Bar()\n",
    "     .add_xaxis(x_data)\n",
    "     .add_yaxis('',y_data)\n",
    "     .set_global_opts(title_opts = opts.TitleOpts(title='Star（口碑） 排行'), xaxis_opts=opts.AxisOpts(min_=4.9))\n",
    "     .set_series_opts(label_opts=opts.LabelOpts(is_show=True,position='right'))\n",
    "     .reversal_axis()\n",
    ")\n",
    "grid = Grid(init_opts=opts.InitOpts(theme=ThemeType.VINTAGE))\n",
    "grid.add(b, grid_opts=opts.GridOpts(pos_left=\"20%\"))\n",
    "grid.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.6"
  },
  "nbTranslate": {
   "displayLangs": [
    "*"
   ],
   "hotkey": "alt-t",
   "langInMainMenu": true,
   "sourceLang": "en",
   "targetLang": "fr",
   "useGoogleTranslate": true
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}